package jwr.ex7;

import java.util.HashMap;
import java.util.Set;
import java.util.Iterator;
//import javax.swing.text.html.HTMLDocument.Iterator;

public class HashMapStudent {

	public static void main(String[] args) {
		HashMap<String, Student> hm = new HashMap<String, Student>();
		
		hm.put("조우람", new Student(1, "000-0000-0000"));
		hm.put("뜨뜨뜨", new Student(2, "111111111"));
		hm.put("사사사", new Student(3, "222-2222-2222"));
		
		System.out.println("요소의 개수" + hm.size());
		Set<String> names = hm.keySet();
		Iterator<String> it = names.iterator();
//		Iterator<String> it = names.iterator();
		
		while (it.hasNext()) {
			String name = it.next();
			Student student = hm.get(name);
			System.out.println(name + " : "+student.id+" "+student.tel);
			
		}
		
	}

}
